package net.java.dev.jugbrescia.test.xml.marshalling.xstream;

import net.java.dev.jugbrescia.test.xml.model.Author;

import com.thoughtworks.xstream.converters.SingleValueConverter;

public class AuthorConverter implements SingleValueConverter
{
	public Object fromString(String s)
	{
		return new Author(s);
	}

	public String toString(Object o)
	{
		return ((Author)o).getNewName();
	}

	public boolean canConvert(Class clazz)
	{
		return clazz.equals(Author.class);
	}
}